{if $smarty.get.print != 1}
  {include file="header.tpl"}
{else}
  {include file="headerPrint.tpl"}
{/if}
<form name="form1" action="" method="post">
  <input type="hidden" name="rojmelId" value="{$rojmelId}" />
{$l_from} : {html_select_date prefix="fromDate" start_year="-2" end_year="+1" field_order="DMY" time=$fromDate day_value_format="%02d"}
{$l_to} : {html_select_date prefix="toDate" start_year="-2" end_year="+1" field_order="DMY" time=$toDate day_value_format="%02d"}&nbsp;&nbsp;&nbsp;
<input type="submit" name="find" value="{$l_find}" />
<div class="contentDiv">
  <table border="0" align="center" width="100%" cellspacing="0" cellpadding="2">
  <tr class="table1">
    <th colspan="4">{$l_credit}</th>
    <th>&nbsp;</th>
    <th colspan="4">{$l_debit}</th>
  </tr>
  <tr>
    <td colspan="4" vAlign="top">
      <table border="0" align="center" width="100%" cellspacing="0" cellpadding="1">
      <tr class="table1">
        <th>&nbsp;</th>
        <th align="left">{$l_date}</th>
        <th align="left">{$l_particulars}</th>
        <th align="right">{$l_fine}</th>
        <th align="right">{$l_amount}</th>
      </tr>
      <tr class="table2">
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>{$opening.particular}</td>
        <td align="right">{if $finalFineOpeningCr != 0}{$finalFineOpeningCr|string_format:"%.0f"}{else}&nbsp;{/if}</td>
        <td align="right">{if $finalAmountOpeningCr != 0}{$finalAmountOpeningCr|string_format:"%.0f"}{else}&nbsp;{/if}</td>
      </tr>
      
      {section name="sec" loop=$rojmelDetailArray|@count}
        <tr><td colspan="5"><hr/></td></tr>
        <tr class="table2">
          <td>
            {if $smarty.get.print != 1}
              <a href="rojmelDelete.php?rojmelId={$rojmelDetailArray[sec].rojmelIdCr}&rojmel=1" onClick="if(confirm('Warning: Are you sure?'))">{$l_delete}</a>
              <a href="rojmelEntry.php?rojmelId={$rojmelDetailArray[sec].rojmelIdCr}">{$l_edit}</a>
            {else}
              &nbsp;
            {/if}
          </td>
          <td NOWRAP>{$rojmelDetailArray[sec].rojmelDateCr|date_format:"%e-%b-%Y"}</td>
          
          <td>( {$rojmelDetailArray[sec].partyNameCr} )&nbsp; {$rojmelDetailArray[sec].particularCr}</td>
          <td align="right" style="border-right:1px solid;">{if $rojmelDetailArray[sec].fineCr != 0}{$rojmelDetailArray[sec].fineCr|string_format:"%.0f"}{else}&nbsp;{/if}</td>
          <td align="right">{if $rojmelDetailArray[sec].amountCr != 0}{$rojmelDetailArray[sec].amountCr|string_format:"%.0f"}{else}&nbsp;{/if}</td>
        </tr>
        
      {/section}
      
      <tr><td colspan="5"><hr/></td></tr>
      <tr class="table2">
        <th>&nbsp;</th>
        <th>&nbsp;</th>
        <th>{$l_total}</th>
        <th align="right">{if $total.crFine != 0}{$total.crFine|string_format:"%.0f"}{else}&nbsp;{/if}</th>
        <th align="right">{if $total.crAmount != 0}{$total.crAmount|string_format:"%.0f"}{else}&nbsp;{/if}</th>
      </tr>
      </table>
    </td>
    <td>&nbsp;&nbsp;</td>
    <td colspan="4" vAlign="top">
      <table border="0" align="center" width="100%" cellspacing="0" cellpadding="1">
      <tr class="table1">
        <th>&nbsp;</th>
        <th align="left">{$l_date}</th>
        <th align="left">{$l_particulars}</th>
        <th align="right">{$l_fine}</th>
        <th align="right">{$l_amount}</th>
      </tr>
      <tr class="table2">
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>{$opening.particular}</td>
        <td align="right">{if $finalFineOpeningDr != 0}{$finalFineOpeningDr|string_format:"%.0f"}{else}&nbsp;{/if}</td>
        <td align="right">{if $finalAmountOpeningDr != 0}{$finalAmountOpeningDr|string_format:"%.0f"}{else}&nbsp;{/if}</td>
      </tr>
      
      {section name="sec" loop=$rojmelDetailArray|@count}
        <tr><td colspan="5"><hr/></td></tr>
        
        <tr class="table2">
          <td>
            {if $smarty.get.print != 1}
              <a href="rojmelDelete.php?rojmelId={$rojmelDetailArray[sec].rojmelId}&rojmel=1" onClick="if(confirm('Warning: Are you sure?'))">{$l_delete}</a>
              <a href="rojmelEntry.php?rojmelId={$rojmelDetailArray[sec].rojmelId}">{$l_edit}</a>            
            {else}
              &nbsp;
            {/if}
          </td>
          <td NOWRAP>{$rojmelDetailArray[sec].rojmelDate|date_format:"%e-%b-%Y"}</td>
          <td>( {$rojmelDetailArray[sec].partyName} )&nbsp; {$rojmelDetailArray[sec].particular}</td>
          <td align="right" style="border-right:1px solid;">{if $rojmelDetailArray[sec].fine != 0}{$rojmelDetailArray[sec].fine|string_format:"%.0f"}{else}&nbsp;{/if}</td>
          <td align="right">{if $rojmelDetailArray[sec].amount != 0}{$rojmelDetailArray[sec].amount|string_format:"%.0f"}{else}&nbsp;{/if}</td>
        </tr>
        
      {/section}
      
      <tr><td colspan="5"><hr/></td></tr>
      <tr class="table2">
        <th>&nbsp;</th>
        <th>&nbsp;</th>
        <th>{$l_total}</th>
        <th align="right">{if $total.drFine != 0}{$total.drFine|string_format:"%.0f"}{else}&nbsp;{/if}</th>
        <th align="right">{if $total.drAmount != 0}{$total.drAmount|string_format:"%.0f"}{else}&nbsp;{/if}</th>
      </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td colspan="9">
      <b>{$l_netFine} : {$netFine|string_format:"%.0f"}&nbsp;&nbsp;&nbsp;{$l_netAmount} : {$netAmount|string_format:"%.0f"}</b>
    </td>
  </tr>
  </table>
</div>
</form>
{if $smarty.get.print != 1}
  {include file="footer.tpl"}
{/if}